package day9;
import java.io.*;
/**
 * @author oldliu
 * @since 1.0
 */
public class WriteDAta {
    public static void main(String[] args) {
        try {
//            DataOutputStream dout=new DataOutputStream(new FileOutputStream("java78data.txt"));
//            dout.writeByte(65);
//            dout.writeInt(10000);
//            dout.writeBoolean(2>1);
//            dout.writeDouble(Math.PI);
//            dout.writeUTF("我是laoliu");
//            dout.close();

            DataInputStream din=new DataInputStream(new FileInputStream("java78data.txt"));
            byte b = din.readByte();
          int i = din.readInt();
            boolean f = din.readBoolean();
            double d = din.readDouble();
            String s = din.readUTF();
            System.out.println(b);
            System.out.println(i);
            System.out.println(f);
            System.out.println(d);
            System.out.println(s);
            din.close();
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
